package com.hqyj.utils;

import com.hqyj.mapper.OrderMapper;
import com.hqyj.mapper.PaymentMapper;
import com.hqyj.mapper.TicketMapper;
import com.hqyj.mapper.UserMapper;
import com.hqyj.pojo.User;
import com.hqyj.serviceInf.UserServiceInf;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:config/applicationContext.xml")
public class SQLTest {
    @Autowired
    private UserMapper userMapper;
    @Autowired
    private UserServiceInf userServiceInf;

    @Autowired
    private PaymentMapper paymentMapper;
    @Autowired
    private TicketMapper ticketMapper;
    @Autowired
    private OrderMapper orderMapper;
    @Test
    public void test(){
//        List<User> users = paymentMapper.selectAll("");
////        System.out.println(users);
//        for(User user: users){
//            System.out.println(user);
//        }
        System.out.println(userServiceInf.selectUser(1, 1, "1"));
    }
}
